{% extends "base_generic.html" %}
{% load i18n %}

{% block content %}
    <h1>{% trans "Author" %}: {{ author.first_name }} {{ author.last_name }}</h1>
    <p>{{ author.date_of_birth }} - {% if author.date_of_death %}{{ author.date_of_death }}{% endif %}</p>

    <div style="margin-left:20px;margin-top:20px">
    <h4>{% trans "Books" %}</h4>

    {% for book in author.book_set.all %}
    <p><strong><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></strong> ({{book.bookinstance_set.all.count}})</p>
    <p>{{ book.summary }}</p>
    {% endfor %}

    </div>
{% endblock %} 